﻿/* DotNetHoldem 
 * .Net Solution that allows to use OpenHoldem with .Net logic
 * Author: Óscar Andreu
 * oesido at gmail dot com
 * Licensed under GPLv3 - 2012
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetBotLogic.Classes;
using DotNetBotLogic.Enums;
using DotNetBotLogic.Classes.BetRoundClasses;
using DotNetBotLogic.Classes.BetRoundClasses.NL6Max;
using DotNetBotLogic.Classes.Log;

namespace DotNetBotLogic.Controllers
{
    /// <summary>
    /// In this controller you can load diferents logic class using for example a config file and conditional load, I am using classes for NL6Max, but you
    /// can add as many classes as you want
    /// Another use is to calculate gneral values needed ot kwnow if call/fold
    /// </summary>
    internal class CallController : BaseController
    {
        #region Variables

        int numberOfCalls = 0;

        #endregion

        #region Constructor

        internal CallController(MainController ctrlBase)
            : base()
        { }

        #endregion

        #region Private

        private void InitializeBetRound()
        {
            numberOfCalls = 0;
        }

        #endregion

        #region Overrrides

        protected override BetRoundBase Preflop()
        {
            InitializeBetRound();

            Logger.Log(string.Format("################  PREFLOP ({0})  call", MainController.RoundTurn));

            return new CallPreflopNL6(this);
        }

        protected override BetRoundBase Flop()
        {
            InitializeBetRound();

            Logger.Log(string.Format("################  FLOP ({0})  call", MainController.RoundTurn));

            return new CallFlopNL6(this);
        }

        protected override BetRoundBase Turn()
        {
            InitializeBetRound();

            Logger.Log(string.Format("################  TURN ({0})  call", MainController.RoundTurn));

            return new CallTurnNL6(this);
        }

        protected override BetRoundBase River()
        {
            InitializeBetRound();

            Logger.Log(string.Format("################  RIVER ({0})  call", MainController.RoundTurn));

            return new CallRiverNL6(this);
        }

        #endregion

    }

}
